package com.huilian.iotbox.data.dto;

import com.huilian.iotbox.data.enums.ConsumeRecordTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author: loong
 * @create: 2022-01-05 10:28
 **/
@Data
public class StatsStoreDto extends QueryParam implements Serializable {
    private static final long serialVersionUID = -8354445779698754688L;
    private Long id;

    private Integer statsType;
    private Integer agencyId;
    private Integer userId;
    /**
     * 关联场地表id
     */
    private Integer mchStoreId;
    /**
     * 1 天 2 月
     **/
    private Integer type;
    /**
     * 日期
     */
    private String dateStr;
    /**
     * 总营业额
     */
    private BigDecimal turnover;
    /**
     * 线上营业额
     */
    private BigDecimal turnoverOnLine;
    /**
     * 线下营业额
     */
    private BigDecimal turnoverOffline;
    /**
     * 笔数
     */
    private Integer orderCount;
    /**
     * 线上订单笔数
     */
    private Integer orderCountOnLine;
    /**
     * 线下订单笔数
     */
    private Integer orderCountOffline;
    /**
     * 总支付手续费
     */
    private BigDecimal handlingCharge;
    /**
     * 总结算金额(上游结算金额+平台结算金额)=营业额-支付手续费-结算手续费(上游节假日结算扣除万2)
     */
    private BigDecimal settlementMoney;
    /**
     * 平台总结算金额
     */
    private BigDecimal platformSettlementMoney;
    /**
     * 消费会员个数
     */
    private Integer memberConsumeNum;
    /**
     * 会员新增个数
     */
    private Integer memberNewNum;
    /**
     * 微信收款
     */
    private BigDecimal wxMoney;
    /**
     * 支付宝收款
     */
    private BigDecimal aliMoney;
    /**
     * 现金收款
     */
    private BigDecimal cashMoney;
    /**
     * 出币总数
     */
    private Integer outCoinTotal;
    /**
     * 兑币机出币总数——>线上购买出币（直接购买）
     **/
    private Integer onLinePayOutCoinTotal;
    /**
     * 兑币机出币总数——>线下购买出币（纸钞、硬币）
     **/
    private Integer offLinePayOutCoinTotal;
    /**
     * 币销售数量（虚币）（出币）
     */
    private Integer outCoinSales;
    /**
     * 赠送币（出币）
     */
    private Integer outCoinGive;
    /**
     * 投币总币
     */
    private Integer insertCoinTotal;
    /**
     * 线上投币
     */
    private Integer insertCoinOnLine;
    /**
     * 线下投币
     */
    private Integer insertCoinOffline;

    /**
     * 礼品消耗数
     */
    private Integer giftConsume;
    /**
     * 礼品成本总价
     */
    private BigDecimal giftCost;
    /**
     * 礼品出率
     */
    private BigDecimal giftOutRate;
    /**
     * 投币消费总数
     */
    private Integer consumeRecordCount;

    /**
     * 秒杀活动收款金额
     */
    private BigDecimal seckillMoney;
    /**
     * 拼团活动收款金额
     */
    private BigDecimal groupBookingMoney;
    /**
     * 消费红包活动收款金额
     */
    private BigDecimal consumptionOfRedEnvelopesMoney;
    /**
     * 会员储值活动收款金额
     */
    private BigDecimal memberOfTheStoredValueMoney;

    /**
     * 1元面额张数
     */
    private Integer oneYuanDenomination;
    /**
     * 5元面额张数
     */
    private Integer fiveYuanDenomination;
    /**
     * 10元面额张数
     */
    private Integer tenYuanDenomination;
    /**
     * 20元面额张数
     */
    private Integer twentyYuanDenomination;
    /**
     * 50元面额张数
     */
    private Integer fiftyYuanDenomination;
    /**
     * 100元面额张数
     */
    private Integer oneHundredYuanDenomination;

    private String startTime;
    private String endTime;
    private String startDateStr;
    private String endDateStr;
    /**
     * true = asc,false = desc
     */
    private Boolean turnoverSort;
    /**
     * {value: 0 , label : '自定义'},
     * {value: 1 , label : '今天'},
     * {value: 2 , label : '昨天'},
     * {value: 3 , label : '本月'},
     * {value: 4 , label : '上月'},
     * {value: 5 , label : '今年'}
     */
    private Integer dateType;

    /**
     * 格式：41_26_33
     */
    private String merchantStoreIdStr;

    /**
     * 格式：41_26_33
     */
    private String storeIdList;

    private int[] consumeRecordTypeIdArray;

    // 普通投币类型
    private int[] insertCoinConsumeRecordTypeIdArray = new int[]{
            ConsumeRecordTypeEnum.CONSUME.getCode()
    };
    // 兑币机出币类型
    private int[] outCoinConsumeRecordTypeIdArray = new int[]{
            ConsumeRecordTypeEnum.COIN_MACHINE.getCode(),
            ConsumeRecordTypeEnum.COIN_MACHINE_VERIFY.getCode(),
            ConsumeRecordTypeEnum.COIN_MACHINE_FETCH_COIN.getCode()
    };
    /**
     * 消费类型id
     */
    private Integer consumeRecordTypeId;
    /**
     * 场地ID数组
     */
    private Integer[] merchantStoreIdArray;
    private Integer dayType;
    /**
     * 区分是否凌晨0点到六点
     * */
    private Integer hour;
    private Integer totalDevice;

    /**
     * 统计分支Id
     */
    private Integer branchId;
    private String deviceNo;
}
